<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Gestion des clefs</title>

<style type="text/css">
   <%@include file="../../Ressources/Styles/General/template_gestion.css"%>
   <%@include file="../../Ressources/Styles/Specific/style_clef.css"%>
   <%@include file="../../Ressources/Styles/General/template_layout.css"%>
</style>
</head>
<body>

<%@ include file = "../../Sections/banner.jsp" %>
<%@ include file = "../../Sections/framecontent.jsp" %>

<div id="maincontent">
	<div class="innercontent">
		<div class="page-title">Gestion des clefs</div> 
		<div id="regForm_add">
			<html:form action="/clef?type=Ajouter" focus="name" styleClass="form-sub-title">
			<div class="form-title">Ajouter une clef</div>  
				<html:hidden property="id" value=""/>
				<table>
					<tbody>	
						<tr>
						    <td>Nom :</td>
					    	<td><div class="input-container"><html:text property="name"/></div></td>	
						</tr>
						<tr>
						    <td>Description :</td>
					    	<td><div class="input-container"><html:text property="description" size="60"/></div></td>	
						</tr>
						<tr>
						    <td>
					    		<html:submit value="Ajouter" styleClass="formButton"/>
					    		<html:reset value="Annuler" styleClass="formButton"/>
					    	</td>
					    	<td></td>	
						</tr>	
					</tbody>
				</table>
			</html:form>
		</div>
		<div id="form_list" class="width_list">
			<div class="form-title">Liste des clefs</div>  	
			<table rules="rows" cellpadding=6 cellspacing=3>
			  <tr class="table_headers">
			    <td>Nom</td>
			    <td>Description</td>		
			    <td></td> 
			  </tr>
				<logic:iterate scope="request" name="KeyForm" property="keys" id="keys">
					<tr>
					<html:form styleClass="form-sub-title">
						<html:hidden name="keys" property="id"/>
				        <td><div class="input-container"><html:text name="keys" property="name"/></div></td>
				        <td><div class="input-container"><html:text name="keys" property="description" size="60"/></div></td>
				        <td>
				    		<html:submit value="Modifier" styleClass="formButton" onclick="form.action='../GTI350_lab/clef.do?type=Modifier'"/>
					        <html:submit value="Supprimer" styleClass="formButton" onclick="form.action='../GTI350_lab/clef.do?type=Supprimer'"/>
				        </td>
					</html:form>
					</tr>
				</logic:iterate>
			</table>
		</div>
	
	<div id="form_list" class="width_list">
		<h3>Message :</h3>
		<c:if test="${requestScope.resultat eq 1}"><p><font size="3" color="green"><b>${requestScope.message}</b></font></p></c:if>
		<c:if test="${requestScope.resultat eq 0}"><p><font size="3" color="red"><b>${requestScope.message}</b></font></p></c:if>
	</div>
	</div>
</div>
</body>
</html>